package PopupView;

import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.support.design.widget.TextInputLayout;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.PopupWindow;

import com.example.androidtest.R;
import com.gc.materialdesign.views.ButtonRectangle;

/**
 * Created by areehy on 2016/8/10.
 */
public class LoginPop extends PopupWindow {

    private ButtonRectangle CaptchaGet;
    private ButtonRectangle CaptchaCheck;
    private TextInputLayout usernameWrapper;
    private View mMenuView;
    public  LoginPop(Activity context, View.OnClickListener itemsOnClick) {
        LayoutInflater inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        mMenuView = inflater.inflate(R.layout.login_check, null);//应该是要显示的布局吧
        CaptchaCheck = (ButtonRectangle)mMenuView.findViewById(R.id.SubmitCaptcha_btn);
        CaptchaCheck = (ButtonRectangle)mMenuView.findViewById(R.id.GetCaptcha_btn) ;
        usernameWrapper = (TextInputLayout)mMenuView.findViewById(R.id.CaptchaWrapper);


        //设置SelectPicPopupWindow的View
        this.setContentView(mMenuView);
        //设置SelectPicPopupWindow弹出窗体的宽
        this.setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
        //设置SelectPicPopupWindow弹出窗体的高
        this.setHeight(ViewGroup.LayoutParams.MATCH_PARENT);
        //设置SelectPicPopupWindow弹出窗体可点击
        this.setFocusable(true);
        //设置SelectPicPopupWindow弹出窗体动画效果
        this.setAnimationStyle(R.style.PopupAnimation);
        //实例化一个ColorDrawable颜色为半透明
        ColorDrawable dw = new ColorDrawable(0xb0000000);
        //设置SelectPicPopupWindow弹出窗体的背景
        this.setBackgroundDrawable(dw);
    }


    private void init()
    {

    }
}
